<template>
  <div class="notFount_error">
    <div class='error-text'>
      <div class="error-code">404</div>
      <div class="error-title">页面不存在</div>
      <el-button @click="$router.go(-1)" type="primary">{{ seconds }} 秒后返回上一页</el-button>
    </div>
  </div>
</template>
<script>
export default {
  name: "notFound",
  data() {
    return {
      seconds: 5,
      timer: ''
    }
  },
  mounted() {
    this.timer = setInterval(() => {
      if (this.seconds === 0) {
        clearInterval(this.timer);
        this.$router.go(-1);
        return
      }
      this.seconds -= 1;
    }, 1000)
  },
  destroyed() {
    clearInterval(this.timer);
  }
}
</script>
<style scoped lang="less">

</style>